package com.example.jetpack.ui.main

import android.arch.lifecycle.ViewModel
import android.databinding.ObservableField
import com.example.jetpack.data.User


class MainViewModel : ViewModel() {
     var  firstName = ObservableField<String>()
    private  var  user:User= User()
    fun getUser() :User{
        return user
    }
    fun setUser(){
         user.setFirstName("bbbbbbbbbbbb")
         user.setImageUrl("http://i.imgur.com/DvpvklR.png")
         user.notifyChange()
     }

     fun updateUser(){
          user.setFirstName("1111111111")
          user.notifyChange()
     }
}
